<?php if (!defined('THINK_PATH')) exit();?><!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="utf-8">
    <title>Amaze UI Admin index Examples</title>
    <link rel="icon" type="image/png" href="/dianying/Public/Admin/assets/i/favicon.png">
    <link rel="apple-touch-icon-precomposed" href="/dianying/Public/Admin/assets/i/app-icon72x72@2x.png">
    <link rel="stylesheet" href="/dianying/Public/Admin/assets/css/amazeui.min.css" />
    <link rel="stylesheet" href="/dianying/Public/Admin/assets/css/amazeui.datatables.min.css" />
    <link rel="stylesheet" href="/dianying/Public/Admin/assets/css/app.css">
    <script src="/dianying/Public/Admin/assets/js/jquery.min.js"></script>
    <script src="/dianying/Public/Admin/assets/js/echarts.min.js"></script>
     <link href="/dianying/Public/Admin/assets/themes/default/css/umeditor.css" type="text/css" rel="stylesheet">
    <script type="text/javascript" src="/dianying/Public/Admin/assets/third-party/jquery.min.js"></script>
    <script type="text/javascript" src="/dianying/Public/Admin/assets/third-party/template.min.js"></script>
    <script type="text/javascript" charset="utf-8" src="/dianying/Public/Admin/assets/umeditor.config.js"></script>
    <script type="text/javascript" charset="utf-8" src="/dianying/Public/Admin/assets/umeditor.min.js"></script>
    <script type="text/javascript" src="/dianying/Public/Admin/assets/lang/zh-cn/zh-cn.js"></script>
</head>

<body data-type="index">
    <script src="/dianying/Public/Admin/assets/js/theme.js"></script>
    <div class="am-g tpl-g">
        <!-- 头部 -->
        <header>
            <!-- logo -->
            <div class="am-fl tpl-header-logo">
                <a href="javascript:;"><img src="/dianying/Public/Admin/assets/img/logo.png" alt=""></a>
            </div>
            <!-- 右侧内容 -->
            <div class="tpl-header-fluid">
                <!-- 侧边切换 -->
                <div class="am-fl tpl-header-switch-button am-icon-list">
                    <span>

                </span>
                </div>
                <!-- 其它功能-->
                <div class="am-fr tpl-header-navbar">
                    <ul>
                        <!-- 欢迎语 -->
                        <li class="am-text-sm tpl-header-navbar-welcome">
                            <a href="javascript:;">欢迎你, <span><?php echo ($_SESSION['Info']['username']); ?> </span> </a>
                        </li>
                        <!-- 退出 -->
                        <li class="am-text-sm">
                            <a href="<?php echo U('Login/loginout');?>">
                                <span class="am-icon-sign-out"></span> 退出
                            </a>
                        </li>
                    </ul>
                </div>
            </div>

        </header>
        <!-- 风格切换 -->
        <div class="tpl-skiner">
            <div class="tpl-skiner-toggle am-icon-cog">
            </div>
            <div class="tpl-skiner-content">
                <div class="tpl-skiner-content-title">
                    选择主题
                </div>
                <div class="tpl-skiner-content-bar">
                    <span class="skiner-color skiner-white" data-color="theme-white"></span>
                    <span class="skiner-color skiner-black" data-color="theme-black"></span>
                </div>
            </div>
        </div>
        <!-- 侧边导航栏 -->
        <div class="left-sidebar">
            <!-- 用户信息 -->
            <div class="tpl-sidebar-user-panel">
                <div class="tpl-user-panel-slide-toggleable">
                    <div class="tpl-user-panel-profile-picture">
                        <img src="/dianying/Public/Admin/assets/img/user04.png" alt="">
                    </div>
                    <span class="user-panel-logged-in-text">
              <i class="am-icon-circle-o am-text-success tpl-user-panel-status-icon"></i>
              禁言小张
          </span>
                </div>
            </div>

 <!-- 菜单 -->
            <ul class="sidebar-nav">
                <li class="sidebar-nav-link">
                    <a href="<?php echo U('index/index');?>" class="active">
                        <i class="am-icon-home sidebar-nav-link-logo"></i> 首页
                    </a>
                </li>
                <li class="sidebar-nav-link">
                    <a href="javascript:;" class="sidebar-nav-sub-title">
                        <i class="am-icon-table sidebar-nav-link-logo"></i> 用户管理
                        <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                    </a>
                    <ul class="sidebar-nav sidebar-nav-sub">
                        <li class="sidebar-nav-link">
                            <a href="<?php echo U('User/liss');?>">
                                <span class="am-icon-angle-right sidebar-nav-link-logo"></span><i class="glyphicon glyphicon-ok"></i> 用户列表
                            </a>
                        </li>
                    </ul>
                                   
                                <li class="sidebar-nav-link">
                    <a href="javascript:;" class="sidebar-nav-sub-title">
                        <i class="am-icon-table sidebar-nav-link-logo"></i> 轮播图管理
                        <span class="am-icon-chevron-down am-fr am-margin-right-sm sidebar-nav-sub-ico"></span>
                    </a>
                    <ul class="sidebar-nav sidebar-nav-sub">
                        <li class="sidebar-nav-link">
                            <a href="<?php echo U('Banner/liss');?>">
                                <span class="am-icon-angle-right sidebar-nav-link-logo"></span><i class="glyphicon glyphicon-ok"></i> 轮播图列表
                            </a>
                        </li>
                    </ul>
                </li>

                </li>
            </ul>
        </div>
  <!-- 内容区域 -->
        <div class="tpl-content-wrapper">
            <div class="row-content am-cf">
                <div class="row">
                    <div class="am-u-sm-12 am-u-md-12 am-u-lg-12">
                        <div class="widget am-cf">
                            <div class="widget-head am-cf">
                                <div class="widget-title  am-cf">用户列表</div>
                            </div>
                            <div class="widget-body  am-fr">

                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-6">
                                    <div class="am-form-group">
                                        <div class="am-btn-toolbar">
                                            <div class="am-btn-group am-btn-group-xs">
                                                <button type="button" class="am-btn am-btn-default am-btn-success"><span class="am-icon-plus"></span> 新增</button>
                                            </div>
                                        </div>
                                    </div>
                                </div>
                                <div class="am-u-sm-12 am-u-md-6 am-u-lg-3">
                                    <div class="am-form-group tpl-table-list-select">
                                        <select data-am-selected="{btnSize: 'sm'}">
              <option value="option1">所有类别</option>
              <option value="option2">IT业界</option>
              <option value="option3">数码产品</option>
              <option value="option3">笔记本电脑</option>
              <option value="option3">平板电脑</option>
              <option value="option3">只能手机</option>
              <option value="option3">超极本</option>
            </select>
                                    </div>
                                </div>
                                <div class="am-u-sm-12 am-u-md-12 am-u-lg-3">
                                    <div class="am-input-group am-input-group-sm tpl-form-border-form cl-p">
                                        <input type="text" class="am-form-field ">
                                        <span class="am-input-group-btn">
            <button class="am-btn  am-btn-default am-btn-success tpl-table-list-field am-icon-search" type="button"></button>
          </span>
                                    </div>
                                </div>

    <div class="am-u-sm-12">
        <table width="100%" class="am-table am-table-compact am-table-striped tpl-table-black ">
            <thead>
                <tr>
                    <th>用户ID</th>
                    <th>用户名</th>
                    <th>邮箱</th>
                    <th>注册时间</th>
                    <th>是否是管理员</th>
                    <th>操作</th>
                    
                </tr>
            </thead>
            <tbody>
                <?php if(is_array($userlist)): foreach($userlist as $key=>$v): ?><tr class="gradeX">
                    <td class="am-text-middle"><?php echo ($v["id"]); ?></td>
                    <td class="am-text-middle"><?php echo ($v["username"]); ?></td>
                    <td class="am-text-middle"><?php echo ($v["email"]); ?></td>
                    <td class="am-text-middle"><?php echo ($v["addtime"]); ?></td>
                    <td class="am-text-middle">
                        <?php if(($v["admin"]) == "0"): ?>是
                        <?php else: ?>
                        否<?php endif; ?>
                        </td>
                    <td class="am-text-middle">
                        <div class="tpl-table-black-operation">
                            <a href="<?php echo U('User/edit',array('id'=>$v[id]));?>">
                                <i class="am-icon-pencil"></i> 编辑
                            </a>
                            <a href="<?php echo U('User/del',array('id'=>$v[id]));?>" class="tpl-table-black-operation-del">
                                <i class="am-icon-trash"></i> 删除
                            </a>
                        </div>
                    </td>
                </tr><?php endforeach; endif; ?>
                <!-- more data -->
            </tbody>
        </table>
    </div>
            <div class="am-u-lg-12 am-cf">

                <div class="am-fr">
                    <ul class="am-pagination tpl-pagination">
                        <li class="am-disabled"><a href="#">«</a></li>
                        <li class="am-active"><a href="#">1</a></li>
                        <li><a href="#">2</a></li>
                        <li><a href="#">3</a></li>
                        <li><a href="#">4</a></li>
                        <li><a href="#">5</a></li>
                        <li><a href="#">»</a></li>
                    </ul>
                </div>
            </div>
        </div>
    </div>
</div>
</div>
</div>
</div>
 </div>
    </div>
    <script src="/dianying/Public/Admin/assets/js/amazeui.min.js"></script>
    <script src="/dianying/Public/Admin/assets/js/amazeui.datatables.min.js"></script>
    <script src="/dianying/Public/Admin/assets/js/dataTables.responsive.min.js"></script>
    <script src="/dianying/Public/Admin/assets/js/app.js"></script>
</body>
<script type="text/javascript">
    var pic = document.getElementById('doc-form-file');
    var img = document.getElementById('img');
    pic.onchange = function(){
        img.style.display = 'block';
        img.src = window.URL.createObjectURL(pic.files[0]);
    }
    //实例化编辑器
    var um = UM.getEditor('myEditor');
</script>
</html>